\(\int x \cos (a+b \sqrt {c+d x}) \, dx\) [91]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 167 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=-\frac {12 \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^2}-\frac {2 c \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {6 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {12 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}-\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2} \]

[Out]

-12*cos(a+b*(d*x+c)^(1/2))/b^4/d^2-2*c*cos(a+b*(d*x+c)^(1/2))/b^2/d^2+6*(d*x+c)*cos(a+b*(d*x+c)^(1/2))/b^2/d^2
+2*(d*x+c)^(3/2)*sin(a+b*(d*x+c)^(1/2))/b/d^2-12*sin(a+b*(d*x+c)^(1/2))*(d*x+c)^(1/2)/b^3/d^2-2*c*sin(a+b*(d*x
+c)^(1/2))*(d*x+c)^(1/2)/b/d^2

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3513, 3377, 2718} \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=-\frac {12 \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^2}-\frac {12 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}+\frac {6 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {2 c \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}-\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2} \]

[In]

Int[x*Cos[a + b*Sqrt[c + d*x]],x]

[Out]

(-12*Cos[a + b*Sqrt[c + d*x]])/(b^4*d^2) - (2*c*Cos[a + b*Sqrt[c + d*x]])/(b^2*d^2) + (6*(c + d*x)*Cos[a + b*S
qrt[c + d*x]])/(b^2*d^2) - (12*Sqrt[c + d*x]*Sin[a + b*Sqrt[c + d*x]])/(b^3*d^2) - (2*c*Sqrt[c + d*x]*Sin[a +
b*Sqrt[c + d*x]])/(b*d^2) + (2*(c + d*x)^(3/2)*Sin[a + b*Sqrt[c + d*x]])/(b*d^2)

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3513

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_.) + (h_.)*(x_))^(m_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \left (-\frac {c x \cos (a+b x)}{d}+\frac {x^3 \cos (a+b x)}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{d} \\ & = \frac {2 \text {Subst}\left (\int x^3 \cos (a+b x) \, dx,x,\sqrt {c+d x}\right )}{d^2}-\frac {(2 c) \text {Subst}\left (\int x \cos (a+b x) \, dx,x,\sqrt {c+d x}\right )}{d^2} \\ & = -\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}-\frac {6 \text {Subst}\left (\int x^2 \sin (a+b x) \, dx,x,\sqrt {c+d x}\right )}{b d^2}+\frac {(2 c) \text {Subst}\left (\int \sin (a+b x) \, dx,x,\sqrt {c+d x}\right )}{b d^2} \\ & = -\frac {2 c \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {6 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}-\frac {12 \text {Subst}\left (\int x \cos (a+b x) \, dx,x,\sqrt {c+d x}\right )}{b^2 d^2} \\ & = -\frac {2 c \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {6 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {12 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}-\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {12 \text {Subst}\left (\int \sin (a+b x) \, dx,x,\sqrt {c+d x}\right )}{b^3 d^2} \\ & = -\frac {12 \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^2}-\frac {2 c \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {6 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {12 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}-\frac {2 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {2 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.37 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.43 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {2 \left (\left (-6+b^2 (2 c+3 d x)\right ) \cos \left (a+b \sqrt {c+d x}\right )+b \sqrt {c+d x} \left (-6+b^2 d x\right ) \sin \left (a+b \sqrt {c+d x}\right )\right )}{b^4 d^2} \]

[In]

Integrate[x*Cos[a + b*Sqrt[c + d*x]],x]

[Out]

(2*((-6 + b^2*(2*c + 3*d*x))*Cos[a + b*Sqrt[c + d*x]] + b*Sqrt[c + d*x]*(-6 + b^2*d*x)*Sin[a + b*Sqrt[c + d*x]
]))/(b^4*d^2)

Maple [A] (verified)

Time = 1.59 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.78

method result size
parts \(\frac {2 x \sqrt {d x +c}\, \sin \left (a +b \sqrt {d x +c}\right )}{d b}+\frac {2 x \cos \left (a +b \sqrt {d x +c}\right )}{d \,b^{2}}-\frac {2 \left (\frac {-2 \left (a +b \sqrt {d x +c}\right )^{2} \cos \left (a +b \sqrt {d x +c}\right )+4 \cos \left (a +b \sqrt {d x +c}\right )+4 \left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )-2 a \left (\sin \left (a +b \sqrt {d x +c}\right )-\left (a +b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {d x +c}\right )\right )}{b^{2} d}-\frac {2 a \left (\sin \left (a +b \sqrt {d x +c}\right )-\left (a +b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {d x +c}\right )+a \cos \left (a +b \sqrt {d x +c}\right )\right )}{d \,b^{2}}+\frac {2 \cos \left (a +b \sqrt {d x +c}\right )+2 \left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )-2 a \sin \left (a +b \sqrt {d x +c}\right )}{b^{2} d}\right )}{d \,b^{2}}\) \(297\)
derivativedivides \(\frac {2 a c \sin \left (a +b \sqrt {d x +c}\right )-2 c \left (\cos \left (a +b \sqrt {d x +c}\right )+\left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )-\frac {2 a^{3} \sin \left (a +b \sqrt {d x +c}\right )}{b^{2}}+\frac {6 a^{2} \left (\cos \left (a +b \sqrt {d x +c}\right )+\left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}-\frac {6 a \left (\left (a +b \sqrt {d x +c}\right )^{2} \sin \left (a +b \sqrt {d x +c}\right )-2 \sin \left (a +b \sqrt {d x +c}\right )+2 \left (a +b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}+\frac {2 \left (\left (a +b \sqrt {d x +c}\right )^{3} \sin \left (a +b \sqrt {d x +c}\right )+3 \left (a +b \sqrt {d x +c}\right )^{2} \cos \left (a +b \sqrt {d x +c}\right )-6 \cos \left (a +b \sqrt {d x +c}\right )-6 \left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}}{b^{2} d^{2}}\) \(299\)
default \(\frac {2 a c \sin \left (a +b \sqrt {d x +c}\right )-2 c \left (\cos \left (a +b \sqrt {d x +c}\right )+\left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )-\frac {2 a^{3} \sin \left (a +b \sqrt {d x +c}\right )}{b^{2}}+\frac {6 a^{2} \left (\cos \left (a +b \sqrt {d x +c}\right )+\left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}-\frac {6 a \left (\left (a +b \sqrt {d x +c}\right )^{2} \sin \left (a +b \sqrt {d x +c}\right )-2 \sin \left (a +b \sqrt {d x +c}\right )+2 \left (a +b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}+\frac {2 \left (\left (a +b \sqrt {d x +c}\right )^{3} \sin \left (a +b \sqrt {d x +c}\right )+3 \left (a +b \sqrt {d x +c}\right )^{2} \cos \left (a +b \sqrt {d x +c}\right )-6 \cos \left (a +b \sqrt {d x +c}\right )-6 \left (a +b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {d x +c}\right )\right )}{b^{2}}}{b^{2} d^{2}}\) \(299\)

[In]

int(x*cos(a+b*(d*x+c)^(1/2)),x,method=_RETURNVERBOSE)

[Out]

2/d/b*x*(d*x+c)^(1/2)*sin(a+b*(d*x+c)^(1/2))+2/d/b^2*x*cos(a+b*(d*x+c)^(1/2))-2/d/b^2*(2/d/b^2*(-(a+b*(d*x+c)^
(1/2))^2*cos(a+b*(d*x+c)^(1/2))+2*cos(a+b*(d*x+c)^(1/2))+2*(a+b*(d*x+c)^(1/2))*sin(a+b*(d*x+c)^(1/2))-a*(sin(a
+b*(d*x+c)^(1/2))-(a+b*(d*x+c)^(1/2))*cos(a+b*(d*x+c)^(1/2))))-2*a/d/b^2*(sin(a+b*(d*x+c)^(1/2))-(a+b*(d*x+c)^
(1/2))*cos(a+b*(d*x+c)^(1/2))+a*cos(a+b*(d*x+c)^(1/2)))+2/d/b^2*(cos(a+b*(d*x+c)^(1/2))+(a+b*(d*x+c)^(1/2))*si
n(a+b*(d*x+c)^(1/2))-a*sin(a+b*(d*x+c)^(1/2))))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.40 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {2 \, {\left ({\left (b^{3} d x - 6 \, b\right )} \sqrt {d x + c} \sin \left (\sqrt {d x + c} b + a\right ) + {\left (3 \, b^{2} d x + 2 \, b^{2} c - 6\right )} \cos \left (\sqrt {d x + c} b + a\right )\right )}}{b^{4} d^{2}} \]

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="fricas")

[Out]

2*((b^3*d*x - 6*b)*sqrt(d*x + c)*sin(sqrt(d*x + c)*b + a) + (3*b^2*d*x + 2*b^2*c - 6)*cos(sqrt(d*x + c)*b + a)
)/(b^4*d^2)

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.90 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\begin {cases} \frac {x^{2} \cos {\left (a \right )}}{2} & \text {for}\: b = 0 \wedge \left (b = 0 \vee d = 0\right ) \\\frac {x^{2} \cos {\left (a + b \sqrt {c} \right )}}{2} & \text {for}\: d = 0 \\\frac {2 x \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b d} + \frac {4 c \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{2} d^{2}} + \frac {6 x \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{2} d} - \frac {12 \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b^{3} d^{2}} - \frac {12 \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{4} d^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate(x*cos(a+b*(d*x+c)**(1/2)),x)

[Out]

Piecewise((x**2*cos(a)/2, Eq(b, 0) & (Eq(b, 0) | Eq(d, 0))), (x**2*cos(a + b*sqrt(c))/2, Eq(d, 0)), (2*x*sqrt(
c + d*x)*sin(a + b*sqrt(c + d*x))/(b*d) + 4*c*cos(a + b*sqrt(c + d*x))/(b**2*d**2) + 6*x*cos(a + b*sqrt(c + d*
x))/(b**2*d) - 12*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/(b**3*d**2) - 12*cos(a + b*sqrt(c + d*x))/(b**4*d**2)
, True))

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.57 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {2 \, {\left (a c \sin \left (\sqrt {d x + c} b + a\right ) - {\left ({\left (\sqrt {d x + c} b + a\right )} \sin \left (\sqrt {d x + c} b + a\right ) + \cos \left (\sqrt {d x + c} b + a\right )\right )} c - \frac {a^{3} \sin \left (\sqrt {d x + c} b + a\right )}{b^{2}} + \frac {3 \, {\left ({\left (\sqrt {d x + c} b + a\right )} \sin \left (\sqrt {d x + c} b + a\right ) + \cos \left (\sqrt {d x + c} b + a\right )\right )} a^{2}}{b^{2}} - \frac {3 \, {\left (2 \, {\left (\sqrt {d x + c} b + a\right )} \cos \left (\sqrt {d x + c} b + a\right ) + {\left ({\left (\sqrt {d x + c} b + a\right )}^{2} - 2\right )} \sin \left (\sqrt {d x + c} b + a\right )\right )} a}{b^{2}} + \frac {3 \, {\left ({\left (\sqrt {d x + c} b + a\right )}^{2} - 2\right )} \cos \left (\sqrt {d x + c} b + a\right ) + {\left ({\left (\sqrt {d x + c} b + a\right )}^{3} - 6 \, \sqrt {d x + c} b - 6 \, a\right )} \sin \left (\sqrt {d x + c} b + a\right )}{b^{2}}\right )}}{b^{2} d^{2}} \]

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="maxima")

[Out]

2*(a*c*sin(sqrt(d*x + c)*b + a) - ((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b + a))*
c - a^3*sin(sqrt(d*x + c)*b + a)/b^2 + 3*((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b
 + a))*a^2/b^2 - 3*(2*(sqrt(d*x + c)*b + a)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^2 - 2)*sin(sqrt(
d*x + c)*b + a))*a/b^2 + (3*((sqrt(d*x + c)*b + a)^2 - 2)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^3
- 6*sqrt(d*x + c)*b - 6*a)*sin(sqrt(d*x + c)*b + a))/b^2)/(b^2*d^2)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.99 \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=-\frac {2 \, {\left (\frac {{\left (b^{2} c - 3 \, {\left (\sqrt {d x + c} b + a\right )}^{2} + 6 \, {\left (\sqrt {d x + c} b + a\right )} a - 3 \, a^{2} + 6\right )} \cos \left (\sqrt {d x + c} b + a\right )}{b^{2}} + \frac {{\left ({\left (\sqrt {d x + c} b + a\right )} b^{2} c - a b^{2} c - {\left (\sqrt {d x + c} b + a\right )}^{3} + 3 \, {\left (\sqrt {d x + c} b + a\right )}^{2} a - 3 \, {\left (\sqrt {d x + c} b + a\right )} a^{2} + a^{3} + 6 \, \sqrt {d x + c} b\right )} \sin \left (\sqrt {d x + c} b + a\right )}{b^{2}}\right )}}{b^{2} d^{2}} \]

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="giac")

[Out]

-2*((b^2*c - 3*(sqrt(d*x + c)*b + a)^2 + 6*(sqrt(d*x + c)*b + a)*a - 3*a^2 + 6)*cos(sqrt(d*x + c)*b + a)/b^2 +
 ((sqrt(d*x + c)*b + a)*b^2*c - a*b^2*c - (sqrt(d*x + c)*b + a)^3 + 3*(sqrt(d*x + c)*b + a)^2*a - 3*(sqrt(d*x
+ c)*b + a)*a^2 + a^3 + 6*sqrt(d*x + c)*b)*sin(sqrt(d*x + c)*b + a)/b^2)/(b^2*d^2)

Mupad [F(-1)]

Timed out. \[ \int x \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\int x\,\cos \left (a+b\,\sqrt {c+d\,x}\right ) \,d x \]

[In]

int(x*cos(a + b*(c + d*x)^(1/2)),x)

[Out]

int(x*cos(a + b*(c + d*x)^(1/2)), x)